
#include <stdexcept>

#include <boost/date_time/posix_time/posix_time.hpp>
using namespace boost::posix_time;

#include "storage.hpp"

#include "boque/trasit/handler.hpp"


class	WbSinker	
	:	public boque::trasit::Handler
{

public	:
	WbSinker( const char* sink_config_filename, const char* log_config_filename );

	virtual	~WbSinker();

public	:
	virtual	int		handle( const std::string& data );

private	:
	ISinkStorage*	_storage_p;

	uint32_t	_round_count;
	ptime 		_round_time_start;
	size_t		_round_sum_bytes;
};


extern	"C"
{
	boque::trasit::Handler* create( const char* p1, const char* p2);
	void	 destroy( boque::trasit::Handler* p );
}


